<!DOCTYPE html>
<head>
     <link rel="match" href="../expected/ol-render-node-insert-first-ref.html" />
</head>
<html class="reftest-wait">
<body>
<ol id="ol1">
    <li id="two1">Two</li>
    <li>Three</li>
</ol>
<ol reversed id="ol2">
    <li id="two2">Two</li>
    <li>One</li>
</ol>
<script>
    // Two nested requestAnimationFrame() calls to force code execution _after_ initial paint
    requestAnimationFrame(() => {
      requestAnimationFrame(() => {
        const ol1 = document.getElementById("ol1");
        const two1 = document.getElementById("two1");

        const ol2 = document.getElementById("ol2");
        const two = document.getElementById("two2");

        const one = document.createElement("li");
        one.innerHTML = "One";

        const three = document.createElement("li");
        three.innerHTML = "Three";

        ol1.insertBefore( one, two1 );
        ol2.insertBefore( three, two2 );

        document.documentElement.classList.remove("reftest-wait");
      });
    });
</script>
</body>
</html>
